package com.so206.po;

import java.io.Serializable;

public class SmsConfig implements Serializable {
    private Long id;

    /**
    * 通知方式:0.邮件,1.短信
    */
    private Integer notifyType;

    /**
    * 短信验证码key
    */
    private String appkey;

    /**
    * 验证码短信模板
    */
    private String moban;

    /**
    * 通知短信签名
    */
    private String appSign;

    /**
    * 邮件发送服务器
    */
    private String mailHost;

    /**
    * 服务器端口
    */
    private String mailPost;

    /**
    * 用户名
    */
    private String mailUser;

    /**
    * 用户密码
    */
    private String mailPw;

    /**
    * 短信通知key
    */
    private String appk2;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getNotifyType() {
        return notifyType;
    }

    public void setNotifyType(Integer notifyType) {
        this.notifyType = notifyType;
    }

    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    public String getMoban() {
        return moban;
    }

    public void setMoban(String moban) {
        this.moban = moban;
    }

    public String getAppSign() {
        return appSign;
    }

    public void setAppSign(String appSign) {
        this.appSign = appSign;
    }

    public String getMailHost() {
        return mailHost;
    }

    public void setMailHost(String mailHost) {
        this.mailHost = mailHost;
    }

    public String getMailPost() {
        return mailPost;
    }

    public void setMailPost(String mailPost) {
        this.mailPost = mailPost;
    }

    public String getMailUser() {
        return mailUser;
    }

    public void setMailUser(String mailUser) {
        this.mailUser = mailUser;
    }

    public String getMailPw() {
        return mailPw;
    }

    public void setMailPw(String mailPw) {
        this.mailPw = mailPw;
    }

    public String getAppk2() {
        return appk2;
    }

    public void setAppk2(String appk2) {
        this.appk2 = appk2;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", notifyType=").append(notifyType);
        sb.append(", appkey=").append(appkey);
        sb.append(", moban=").append(moban);
        sb.append(", appSign=").append(appSign);
        sb.append(", mailHost=").append(mailHost);
        sb.append(", mailPost=").append(mailPost);
        sb.append(", mailUser=").append(mailUser);
        sb.append(", mailPw=").append(mailPw);
        sb.append(", appk2=").append(appk2);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SmsConfig other = (SmsConfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNotifyType() == null ? other.getNotifyType() == null : this.getNotifyType().equals(other.getNotifyType()))
            && (this.getAppkey() == null ? other.getAppkey() == null : this.getAppkey().equals(other.getAppkey()))
            && (this.getMoban() == null ? other.getMoban() == null : this.getMoban().equals(other.getMoban()))
            && (this.getAppSign() == null ? other.getAppSign() == null : this.getAppSign().equals(other.getAppSign()))
            && (this.getMailHost() == null ? other.getMailHost() == null : this.getMailHost().equals(other.getMailHost()))
            && (this.getMailPost() == null ? other.getMailPost() == null : this.getMailPost().equals(other.getMailPost()))
            && (this.getMailUser() == null ? other.getMailUser() == null : this.getMailUser().equals(other.getMailUser()))
            && (this.getMailPw() == null ? other.getMailPw() == null : this.getMailPw().equals(other.getMailPw()))
            && (this.getAppk2() == null ? other.getAppk2() == null : this.getAppk2().equals(other.getAppk2()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNotifyType() == null) ? 0 : getNotifyType().hashCode());
        result = prime * result + ((getAppkey() == null) ? 0 : getAppkey().hashCode());
        result = prime * result + ((getMoban() == null) ? 0 : getMoban().hashCode());
        result = prime * result + ((getAppSign() == null) ? 0 : getAppSign().hashCode());
        result = prime * result + ((getMailHost() == null) ? 0 : getMailHost().hashCode());
        result = prime * result + ((getMailPost() == null) ? 0 : getMailPost().hashCode());
        result = prime * result + ((getMailUser() == null) ? 0 : getMailUser().hashCode());
        result = prime * result + ((getMailPw() == null) ? 0 : getMailPw().hashCode());
        result = prime * result + ((getAppk2() == null) ? 0 : getAppk2().hashCode());
        return result;
    }
}